package com.alumni_circle.service.home.impl;

import com.alumni_circle.core.service.Impl.BaseServiceImpl;
import com.alumni_circle.entity.home.News;
import com.alumni_circle.entity.home.VO.NewsViewVO;
import com.alumni_circle.mapper.home.NewsMapper;
import com.alumni_circle.service.home.INewsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 龙小虬
 * @since 2020-07-06 22:43
 */
@Service
public class NewsServiceImpl extends BaseServiceImpl<NewsMapper, News> implements INewsService {

    @Resource
    private NewsMapper newsMapper;

    @Override
    public List<NewsViewVO> selectMyListNews(String id) {
        return newsMapper.selectMyListNews(id);
    }

    @Override
    public List<NewsViewVO> searchMyListNews(String id, String search) {
        return newsMapper.searchMyListNews(id,search);
    }

    @Override
    public List<NewsViewVO> getAllNews() {
        return newsMapper.getAllNews();
    }
}
